package com.itheima.homework.homework1;

import java.util.Arrays;
import java.util.Comparator;
/*
将数组中的元素按照从大到小的顺序排序：
 */
public class Demo1 {
    public static void main(String[] args) {
        Integer[] arr = {2, 4, 6, 1, 9, 3, 0, 7};
        Arrays.sort(arr,( i1, i2)-> i2.compareTo(i1));
        System.out.println(Arrays.toString(arr));
    }

}
